export default {
  beforeRouteLeave(to, from, next) {
     if(this.isSubmit){
      next()
     }else{
      next(false)
      this.$confirm('数据尚未保存,是否离开页面?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        next()
      }).catch(() => {
        next(false)
      });
    }
  },
};
